Cytosim  PI
Cytoskeleton Simulator
SpacePeriodic Class Reference

Detailed Description

Space periodic implements periodic boundary condition in all dimensions. The volume has no edge and wraps on itself.

periodic sizeX sizeY sizeZ

With:

  • sizeX = half-width along X
  • sizeY = half-width along Y
  • sizeZ = half-width along Z
Inheritance diagram for SpacePeriodic:
Space Modulo Object Node Inventoried Movable

Public Member Functions

 SpacePeriodic (const SpaceProp *)
 creator
 
void resize ()
 check number and validity of specified lengths
 
bool isPeriodic (int ii) const
 true if the Space is periodic in dimension ii
 
Vector extension () const
 maximum extension along each axis
 
real volume () const
 the volume inside
 
bool inside (const real point[]) const
 true if the point is inside the Space
 
void project (const real point[], real proj[]) const
 project point on the closest edge of the Space
 
Vector period (int d) const
 the d-th direction of periodicity
 
void fold (real[]) const
 set vector to its periodic representation closest to origin
 
void fold (real pos[], const real ref[]) const
 remove periodic repeats in pos[], to bring it closest to ref[]
 
void foldOffset (real pos[], real trans[]) const
 bring ref[] closest to origin, returning translation done in trans[]
 
bool display () const
 OpenGL display function, return true is display was done.
 
- Public Member Functions inherited from Space
 Space (const SpaceProp *p)
 constructor
 
virtual ~Space ()
 destructor
 
unsigned int nbLengths () const
 number of dimensions defined by the user
 
real length (unsigned int d) const
 return dimension d
 
real length2 (unsigned int d) const
 return double dimension d
 
real lengthSqr (unsigned int d) const
 return squared dimension d
 
void readLengths (const std::string &)
 read dimensions from a stream
 
void checkLengths (unsigned int required, bool positive) const
 check that required lengths have been specified More...
 
void resize (unsigned int d, real v)
 change dimension d to v, and update derived variables (this calls resize())
 
virtual void setInteraction (Vector const &pos, PointExact const &, Meca &, real stiff) const
 apply a force directed towards the edge of this Space, for a point located at pos More...
 
virtual void setInteraction (Vector const &pos, PointExact const &, real rad, Meca &, real stiff) const
 apply a force directed towards the edge of this Space deflated by radius More...
 
virtual bool allInside (const real center[], real rad) const
 true if a sphere (center, radius) is entirely inside this Space More...
 
virtual bool allOutside (const real center[], real rad) const
 true if a sphere (center, radius) is entirely outside this Space More...
 
bool outside (const real point[]) const
 true if point is outside this Space ( defined as !inside(point) )
 
void project (const real point[], real proj[], real rad) const
 project point on this Space deflated by radius More...
 
void project (real point[]) const
 project point on edge of this Space, and return the result in point
 
real distanceToEdgeSqr (const real point[]) const
 the square of the distance to the edge of this Space
 
real distanceToEdge (const real point[]) const
 the distance to the edge, always positive
 
real signedDistanceToEdge (const real point[]) const
 the distance to the edge, positive if point is outside, and negative if inside
 
void bounceInside (real w[]) const
 bounce the object off the wall to put it back inside More...
 
virtual Vector normalToEdge (const real point[]) const
 a Vector perpendicular to the space edge at point, directed towards the outside More...
 
Vector randomPlace () const
 a random position in the volume More...
 
virtual Vector randomPlaceNearEdge (real rad) const
 a random position located at most at distance radius from the edge More...
 
Vector randomPlaceOnEdge (real rad) const
 a random position located on the edge More...
 
virtual real estimateVolume (unsigned long cnt) const
 estimate Volume using a poor Monte-Carlo method with cnt trials More...
 
virtual void step ()
 one Monte-Carlo simulation step
 
virtual void setInteractions (Meca &) const
 add interactions to a Meca
 
Tag tag () const
 return unique character identifying the class
 
const Propertyproperty () const
 return Object Property
 
virtual void read (InputWrapper &, Simul &)
 read from file
 
virtual void write (OutputWrapper &) const
 write to file
 
Spacenext () const
 a static_cast<> of Node::next()
 
Spaceprev () const
 a static_cast<> of Node::prev()
 
void displaySection (int dim, real pos, real step) const
 display the outline of a section of the box
 
- Public Member Functions inherited from Object
 Object ()
 constructor
 
std::string reference () const
 concatenation of [ tag(), property()->index(), number() ] in plain ascii More...
 
void writeReference (OutputWrapper &) const
 write a reference that identifies the Object uniquely More...
 
void writeReference (OutputWrapper &, Tag tag) const
 write a reference, but using the provided Tag More...
 
int mark () const
 birth mark value
 
void mark (int m)
 set birth mark
 
int fleck () const
 fleck value (not stored in trajectory files)
 
void fleck (int f) const
 set fleck (the value is not stored in trajectory files)
 
Objectnext () const
 extends Node::next(), with a cast to preserve type
 
Objectprev () const
 extends Node::prev(), with a cast to preserve type
 
- Public Member Functions inherited from Node
 Node ()
 constructor set as unlinked
 
virtual ~Node ()
 destructor More...
 
bool linked () const
 true if Node is linked
 
Nodenext () const
 the next Node in the list, or zero if this is last
 
Nodeprev () const
 the previous Node in the list, or zero if this is first
 
NodeListlist () const
 the list where the object is linked, or zero
 
ObjectSetobjset () const
 return associated ObjectSet
 
- Public Member Functions inherited from Inventoried
 Inventoried ()
 initialize (name=0)
 
 ~Inventoried ()
 destructor
 
void number (Number n)
 change the serial number
 
Number number () const
 serial number : a integer identifier, unique within each class
 
- Public Member Functions inherited from Movable
 Movable ()
 constructor
 
virtual ~Movable ()
 destructor
 
virtual Vector position () const
 return the position in space of the object
 
virtual void setPosition (Vector const &)
 move object to specified position More...
 
virtual bool translatable () const
 true if object accepts translations (default=false)
 
virtual void translate (Vector const &)
 move the object ( position += given vector ) More...
 
virtual bool rotatable () const
 true if object accepts rotations (default=false)
 
virtual void rotate (Rotation const &)
 rotate the object around the origin of coordinates More...
 
virtual void rotateP (Rotation const &)
 rotate the object around its current position More...
 
virtual void foldPosition (Modulo const *)
 perform modulo for periodic boundary conditions More...
 
- Public Member Functions inherited from Modulo
 Modulo ()
 constructor
 
virtual ~Modulo ()
 destructor
 

Additional Inherited Members

- Static Public Member Functions inherited from Object
static std::string strReference (char, int, Number, int)
 build a string reference by concatenating (tag, property_index, number, mark) More...
 
static void readReference (InputWrapper &, int &, Number &, int &, char pretag)
 read a reference (property_index, number, mark) from input More...
 
static void writeNullReference (OutputWrapper &)
 write a reference that does not refer to any Object
 
- Static Public Member Functions inherited from Movable
static Vector readPrimitive (std::istream &, const Space *)
 read a position specified with primitives, such as 'circle 5', etc. More...
 
static Vector readPosition (std::istream &, const Space *)
 read a position in space More...
 
static Vector readDirection (std::istream &, const Vector &, const Space *)
 read an orientation, and return a normalized vector More...
 
static Rotation readRotation (std::istream &, const Vector &, const Space *)
 read a rotation specified in is, at position pos More...
 
- Public Attributes inherited from Space
const SpacePropprop
 parameters
 
- Static Public Attributes inherited from Space
static const Tag TAG = 'e'
 a unique character identifying the class
 
- Static Public Attributes inherited from Object
static const Tag TAG = 'v'
 Object::TAG = 'v' represents the 'void' pointer.
 
- Protected Attributes inherited from Space
unsigned int nLength
 number of dimensions defined in mLength[]
 
real mLength [DMAX]
 dimensions that define the geometry
 
real mLength2 [DMAX]
 double of each dimension
 
real mLengthSqr [DMAX]
 square of each dimension
 
- Protected Attributes inherited from Node
NodenNext
 the next Node in the list
 
NodenPrev
 the previous Node in the list
 
- Protected Attributes inherited from Inventoried
Number nNumber
 object identifier, unique within the class defined by tag()
 
- Static Protected Attributes inherited from Space
static const unsigned int DMAX = 8
 max number of dimensions